import { Routes, Route, Navigate } from 'react-router-dom';
import MainLayout from '@/components/Layout/MainLayout';
import Dashboard from '@/pages/Dashboard';
import Upload from '@/pages/Upload';
import RecordList from '@/pages/RecordList';
import Assessment from '@/pages/Assessment';
import Report from '@/pages/Report';

const AppRouter = () => {
  return (
    <Routes>
      <Route path="/" element={<MainLayout />}>
        <Route index element={<Navigate to="/dashboard" replace />} />
        <Route path="dashboard" element={<Dashboard />} />
        <Route path="upload" element={<Upload />} />
        <Route path="records" element={<RecordList />} />
        <Route path="assessment/:id" element={<Assessment />} />
        <Route path="report/:id" element={<Report />} />
      </Route>
      <Route path="*" element={<Navigate to="/dashboard" replace />} />
    </Routes>
  );
};

export default AppRouter;

